package com.education.mapper;

import com.education.domain.Tbterm;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;

import java.util.List;

/**
 * Created by zhangjiawen on 2019/11/20.
 */
public interface TbtermMapperPlus {

    @Select("SELECT * FROM tbterm order by dtSchoolYear desc")
    @Results({
            @Result(column="lId", property="lid", jdbcType= JdbcType.INTEGER, id=true),
            @Result(column="nGrade", property="ngrade", jdbcType=JdbcType.INTEGER),
            @Result(column="nHalfTerm", property="nhalfterm", jdbcType=JdbcType.INTEGER),
            @Result(column="dtSchoolYear", property="dtschoolyear", jdbcType=JdbcType.DATE),
            @Result(column="dtCreatTime", property="dtcreattime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Tbterm> getAll();
}
